home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-in_the_mag-
/
reader_requests
/
pdflib
/
bindings
/
python
/
hello.py
next >
Wrap
Text File
|
1999-09-16
|
477b
|
21 lines
#!/usr/bin/python
from pdflib import *
fp = fopen("hello_python.pdf", "w")
ip = PDF_get_info()
PDF_info_Creator_set(ip, "hello.py")
PDF_info_Author_set(ip, "RJS")
PDF_info_Title_set(ip, "Hello world (Python)")
PDF_info_fontpath_set(ip, "../../fonts")
p = PDF_open(fp, ip)
PDF_begin_page(p, 595, 842)
PDF_set_font(p, "Helvetica-Bold", 18.0, winansi)
PDF_set_text_pos(p, 50, 700)
PDF_show(p, "Hello world!")
PDF_continue_text(p, "(says Python)")
PDF_end_page(p)
PDF_close(p)